﻿using EV.EventBus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ZoneLine.Common;
using ZoneLine.Stations;
using ZoneLine.ViewModels;
using ZoneLine.Views;

namespace ZoneLine
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class PackingMainView : Window
    {
        public PackingMainView()
        {
            InitializeComponent();
        }

        //private void OpenAuth(object sender, RoutedEventArgs e)
        //{
        //    if (this.DataContext is PackingMainViewModel vm)
        //    {
        //        var view = new AuthView(() => { vm.EnterAuth = true; });
        //        view.Topmost = true;
        //        view.Show();
        //    }
        //}

        //private void CloseAuth(object sender, RoutedEventArgs e)
        //{
        //    if (this.DataContext is PackingMainViewModel vm)
        //    {
        //        vm.EnterAuth = false;
        //    }
        //}

        //private void ClearDataBtn(object sender, RoutedEventArgs e)
        //{
        //    try
        //    {
        //        var res = HandyControl.Controls.MessageBox.Ask("此操作不可逆，确认清除今日生产所产生的所有数据吗？", "温馨提示");
        //        if (res == MessageBoxResult.OK)
        //        {
        //            InitHelper.DeleteTodayDatas();
        //            HandyControl.Controls.MessageBox.Success("今日数据清除完成！", "温馨提示");
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        HandyControl.Controls.MessageBox.Error("删除数据异常" + ex.Message, "温馨提示");
        //    }
        //}

    }
}